<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="navbar.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'contact_note.jsp' starting page</title>
    <link rel="stylesheet" type="text/css" href="styles/css/bootstrap.min.css" />
    <script type="text/javascript" src="styles/jquery/jquery.js"></script>
  </head>
  
  <body class="body">
	<div class="container" style="margin-top:60px;width:960px;margin-left:auto;margin-right:auto;">

	  <div class="row">

		<!-- 导入左侧部分 -->
		<jsp:include page="side.jsp">
			<jsp:param value="contact" name="tag"/>
		</jsp:include>

		<div class="span9">
			
			<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0">
				<li class="active">

					<a href="task.html"><i class="icon-user"></i>联系人</a>
				</li>
			</ul>
			<div class="wall">
				
						
						<address>
							<h3>${contact.contactName }</h3>
							<p>${contact.company }</p>

							<small>手机</small> ${contact.tel }<br/>
							<small>固话</small> ${contact.phone }<br/><br/>
							<small>邮箱</small> ${contact.email }<br/>
							<small>地址</small> ${contact.address }<br/><br/>

							<small>主页</small> <a href="${coantact.mainWeb }">${contact.mainWeb }</a><br/>
							<small>微博</small> <a href="${coantact.mainWeb }">${contact.blog }</a><br/>
						</address>
						<div class="line">记录</div>
						<form  action="pms.jspx?m=sentcontact_note&id=${contact.contactId}" method="post" name="myform">

							<textarea class="span5" rows="3" name="desc"></textarea>
							<br/>
							<button id="btn">发布</button>
						</form>
						
						<c:forEach items="${recoderlist.result }" var="recoder">
							<blockquote >
							 	${recoder.desc }
							  <small>${recoder.user.nickName}发布于${recoder.time}</small>
							</blockquote>
						</c:forEach>
						
						
						 ${recoderlist.pageNum }/${recoderlist.totalPages }
					   	<c:choose>
					   		<c:when test="${recoderlist.pageNum==1 }">
					   			首页
					   		</c:when>
					   		<c:otherwise>
					   			<a href="pms.jspx?m=contact_note&p=1">首页</a>
					   		</c:otherwise>
					   	</c:choose>
					   	
					   	<c:choose>
					   		<c:when test="${recoderlist.pageNum==1 }">
					   			上一页
					   		</c:when>
					   		<c:otherwise>
					   			<a href="pms.jspx?m=contact_note&p=${recoderlist.pageNum -1}">上一页</a>
					   		</c:otherwise>
					   	</c:choose>
					   	<c:choose>
					   		<c:when test="${recoderlist.pageNum==page.totalPages }">
					   			下一页
					   		</c:when>
					   		<c:otherwise>
					   			<a href="pms.jspx?m=contact_note&p=${recoderlist.pageNum +1}">下一页</a>
					   		</c:otherwise>
					   	</c:choose>
					    
					    <c:choose>
					    	<c:when test="${recoderlist.pageNum==page.totalPages }">
					    		尾页
					    	</c:when>
					    	<c:otherwise>
					    		<a href="pms.jspx?m=contact_note&p=${recoderlist.totalPages }">尾页</a>
					    	</c:otherwise>
					    </c:choose>
					   	
					   	
						<br/>
						<br/>
						<a href="contact.jspx">←返回联系人列表</a>
							
						<br/>
						<br/>	
						<br/>
						<br/>	
						
			</div>
			
			
			
		</div>
	  </div>
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#btn").click(function(){
				$("myform").submit();
			});
			
		});
	</script>
	
  </body>
</html>
